﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TimberSmart.Model;
using TimberSmart.Model.Security;

namespace TimberSmart.Data.Configuration
{
    public class UserConfiguration : EntityTypeConfiguration<User>
    {
        public UserConfiguration()
        {
            Property(c => c.FirstName)
                .IsRequired()
                .HasMaxLength(32);

            Property(c => c.LastName)
                .IsRequired()
                .HasMaxLength(32);

            Property(c => c.RowVersion)
                .IsRowVersion();
        }
    }
}
